import server from "../../utils/axios.js";
/**
 * @description 菜单
 */
export default class System7 {
  constructor() {}
  static async getList(search = "") {
    let result = await server(this.name, "GetList", { search });
    return result;
  }
  /**
   * @description 得到菜单List
   */
  static async get() {
    let result = await server("System7");
    let pid = "System_7_60";
    let id = "System_7_10";
    let text = "System_7_20";
    let url = "strurl";
    //添加项
    result.forEach(item => {
      Object.assign(item, {
        pid: item[pid],
        id: item[id],
        text: item[text],
        url: item[url] || "",
        children: []
      });
    });
    return result;
  }
}
